package cn.cvs.service;

import cn.cvs.dao.PowerMapper;
import cn.cvs.pojo.Powerbattery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service("powerServiceImpl")
@Transactional
public class PowerServiceImpl implements PowerService{
    @Autowired
    private PowerMapper powerMapper;
    @Override
    public List<Powerbattery> list() {
        return powerMapper.list();
    }

    @Override
    public int delete(int id) {
        return powerMapper.delete(id);
    }

    @Override
    public Powerbattery selectId(int id) {
        return powerMapper.selectId(id);
    }

    @Override
    public int update(Powerbattery powerbattery) {
        return powerMapper.update(powerbattery);
    }
}
